<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
	<meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
	<title>编辑属性</title>
	<hdjs />
	<js file= '__PUBLIC__/js/mod.base.js,__PUBLIC__/js/mod.attr.js' />
	<css file= '__PUBLIC__/css/mod.base.css' />
</head>
<body>
	<form action="" method="post" class="hd-form" name="form" >
		<div class="hd-menu-list">
			<ul>
				<li>
	                <a href="{:U('Type/index')}">类型列表</a>
	            </li>
				<li >
					<a href="{:U('Attr/index',array('typeid'=>$_GET['typeid']))}">属性列表</a>
				</li>
				<li class="active">
					<a href="javascript:;">编辑属性</a>
				</li>
			</ul>
		</div>
		<div class="hd-title-header">温馨提示</div>
		<div class="help">
			<ul>
				<li>类型：{$typename} 请谨慎修改！</li>
			</ul>
		</div>
		<div class="hd-title-header">编辑属性</div>
		<div class="right_content">
			<table class="hd-table hd-table-form">
				<tbody>
					<tr>
						<th class="hd-w100">
							属性名称
							<span class="star">*</span>
						</th>
						<td>
							<input type="text" name="attr_name" class="hd-w200" value="{$data.attr_name}"></td>
					</tr>
					<tr>
						<th class="hd-w100">
							排序
							<span class="star">*</span>
						</th>
						<td>
							<input type="text" name="sort"  class='hd-w200' value="{$data.sort}"/>
						</td>
					</tr>	
					<tr style="display:none">
						<th class="hd-w100">
							属性类型
							<span class="star">*</span>
						</th>
						<td>
							<label >
								<input value="1" type="radio" name="type" <if condition="$data['type'] eq 1"> checked='checked' </if>> 单选</label>
							<label >
								<input value="2" type="radio" name="type"  <if condition="$data['type'] eq 2"> checked='checked' </if>> 多选</label>
						</td>
					</tr>

					<tr >
						<th class="hd-w100">
							是否有关联图集
							<span class="star">*</span>
						</th>
						<td>
							<label>
								<input type="radio" name='is_pic' value='1'  <if condition="$data['is_pic'] eq 1"> checked='checked' </if>/>  有
							</label>
							<label>
								<input type="radio" name='is_pic' value='0' <if condition="!$data['is_pic'] eq 1"> checked='checked' </if>/>  没有
							</label>
						</td>
					</tr>
					<tr>
						<th class="hd-w100">
							属性值
							<span class="star">*</span>
						</th>
						<td>
							<table class='attr_value'>
								<if condition ='$data[attr_value]'>
								<foreach name='data.attr_value' item='v'>
								<tr>
									<td>
									 	名称：<input type="text" name='attr_value_name[][{$v.attr_value_id}]' class='w180' value='{$v.attr_value_name}'/>
										值：<input type="text" name='attr_value[][{$v.attr_value_id}]' class='w180' value='{$v.attr_value}'/><if condition='!$key'>
										&nbsp;<span class='hand plus'>[+]</span>
										<else />
										&nbsp;<span class='hand minus'>[-]</span>
										</if></td>
								</tr>
								</foreach>
								<else />
								<tr>
									<td><input type="text" name='attr_value[]' class='w180' value=''/><span class='hand plus'>[+]</span></td>
								</tr>
								</if>
							</table>
						</td>
					</tr>
				</tbody>
			</table>
		</div>
		<input type="hidden" value="{$Think.get.attr_id}" name="attr_id">
		<input type="hidden" value="{$Think.get.typeid}" name="typeid">
		<input type="submit" value="编辑" class="hd-btn hd-btn-sm">
		<input type="button" value="返回" class="hd-btn hd-btn-sm" onclick="location.href='{:U('Attr/index',array('typeid'=>$_GET['typeid']))}'">
		</form>

</body>
</html>